import java.io.BufferedReader;
import java.io.IOException;


public class InThread extends Thread {
   
   private String fromServer;
   private BufferedReader in;
   
   public InThread(BufferedReader in) throws IOException {
      this.in = in;
   }

   @Override
   public void run() {
      try {
         while ((fromServer = in.readLine()) != null) {
            System.out.println(fromServer);
         }
      } catch (IOException e) {
         e.printStackTrace();
      }
   }
   
   
}
